package o;

import android.content.res.Resources;
import android.text.style.CharacterStyle;
import android.text.style.ForegroundColorSpan;
import android.text.style.StrikethroughSpan;
import o.dky.d;
import o.dky.j;

public class chm {
    private static chm ˊ;
    private static final CharacterStyle ˋ;
    private static final CharacterStyle ˎ;
    private static final CharacterStyle ˏ;
    public static final CharacterStyle ॱ = new StrikethroughSpan();
    private Class<? extends chw> ʼ;

    static {
        Resources resources = ContentManager.getInstant().getContext().getResources();
        ˏ = new ForegroundColorSpan(resources.getColor(d.ͺ));
        ˋ = new ForegroundColorSpan(resources.getColor(d.ॱॱ));
        ˎ = new ForegroundColorSpan(resources.getColor(d.ͺ));
    }

    private chm() {
        ʼ();
    }

    public static chm ॱ() {
        chm o_chm;
        synchronized (chm.class) {
            if (ˊ == null) {
                ˊ = new chm();
            }
            o_chm = ˊ;
        }
        return o_chm;
    }

    private void ʼ() {
    }

    public void ˎ(Class<? extends chw> cls) {
        this.ʼ = cls;
    }

    public void ˋ() {
        chw ᐝ = ᐝ();
        if (ᐝ != null) {
            ᐝ.ˊ();
        }
    }

    public int ˎ() {
        chw ᐝ = ᐝ();
        if (ᐝ != null) {
            return ᐝ.ॱ();
        }
        return 0;
    }

    public int ˊ() {
        chw ᐝ = ᐝ();
        if (ᐝ != null) {
            return ᐝ.ˋ();
        }
        return 0;
    }

    public String ˏ() {
        return NetWorkUtil.getWifiResId(ContentManager.getInstant().getContext(), j.ㆍ);
    }

    public CharacterStyle ʽ() {
        return ˏ;
    }

    private chw ᐝ() {
        if (this.ʼ != null) {
            try {
                return (chw) this.ʼ.newInstance();
            } catch (InstantiationException e) {
                Logger.e("NodeConfig", "getCallback, InstantiationException: " + e.getMessage());
            } catch (IllegalAccessException e2) {
                Logger.e("NodeConfig", "getCallback, IllegalAccessException: " + e2.getMessage());
            }
        } else {
            Logger.e("NodeConfig", "getCallback, callbackClass == null");
            return null;
        }
    }
}
